#include <iostream>
#include <iomanip>
using namespace std;

int main() {
	double h, r, pi = 3.14159, s;
	cin >> h >> r;
	s = 2 * pi * r * r + 2 * pi * r * h;
	cout << fixed << setprecision(2) << s << endl;
	return 0;
}
